package com.res.share.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.res.share.model.ResMessage;
import com.res.share.model.ResNotice;
import com.res.share.mapper.ResNoticeMapper;
import com.res.share.model.dto.MessageModel;
import com.res.share.service.IResNoticeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 公告 服务实现类
 * </p>
 *
 * @author astupidcoder
 * @since 2021-10-28
 */
@Service
public class ResNoticeServiceImpl extends ServiceImpl<ResNoticeMapper, ResNotice> implements IResNoticeService {

    @Override
    public IPage<MessageModel> findSystemMessageList(Page<MessageModel> page, Integer userId) {
        return baseMapper.findSystemMessageList(page,userId);
    }

    @Override
    public MessageModel findSystemNoticeDetail(Integer id) {
        return baseMapper.findSystemNoticeDetail(id);
    }

    @Override
    public void insertNotifyData(Integer id, Integer userId) {
        baseMapper.insertNotifyData(id,userId);
    }

    @Override
    public Integer findNoReadMessageNums(Integer id) {
        return baseMapper.findNoReadMessageNums(id);
    }
}
